# frozen_string_literal: true

module DescriptionAndReply
  module IssueQueryPatch
    def sql_for_description_field(field, operator, value)
      sql1 = sql_for_field(field, operator, value, Issue.table_name, 'description')
      sql2 = sql_for_notes_field('notes', operator, value)
      "(#{sql1} OR #{sql2})"
    end
  end
end

# 确保补丁生效
Rails.configuration.to_prepare do
  IssueQuery.prepend DescriptionAndReply::IssueQueryPatch
end 